package jp.ddo.trismegistos.timer.data;

import jp.ddo.trismegistos.timer.R;

public enum CountTime {

	ONE_MINUTE(R.id.oneMinute, "1分", 1),

	TWO_MINUTE(R.id.twoMinute, "2分", 2),

	THREE_MINUTE(R.id.threeMinute, "3分", 3),

	FOR_MINUTE(R.id.forMinute, "4分", 4),

	FIVE_MINUTE(R.id.fiveMinute, "5分", 5),

	TEN_MINUTE(R.id.tenMinute, "10分", 10);

	private String dispName;

	private int time;

	private int id;

	CountTime(final int id, final String dispName, final int time) {
		this.id = id;
		this.dispName = dispName;
		this.time = time;
	}

	public static CountTime get(final int id) {
		switch (id) {
		case R.id.oneMinute:
			return CountTime.ONE_MINUTE;
		case R.id.twoMinute:
			return CountTime.TWO_MINUTE;
		case R.id.threeMinute:
			return CountTime.THREE_MINUTE;
		case R.id.forMinute:
			return CountTime.FOR_MINUTE;
		case R.id.fiveMinute:
			return CountTime.FIVE_MINUTE;
		case R.id.tenMinute:
			return CountTime.TEN_MINUTE;
		default:
			return null;
		}
	}

	/**
	 * @return the dispName
	 */
	public String getDispName() {
		return dispName;
	}

	/**
	 * @return the time
	 */
	public int getTime() {
		return time;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
}
